﻿using System.Linq;
using Core.Contract.DataContract;
using Data.DAO;
using www.Models;

namespace Data.BO
{
    public class StoryRefBO//:BaseBO<StoryDAO,RelaxStory>
    {
        #region value
        private readonly StoryRefDAO _newRefDao = new StoryRefDAO();
        #endregion

        #region Hàm lấy dữ liệu

        public IQueryable<RelaxStoryDataContract> GetStoryDataContracts()
        {
           return _newRefDao.GetStoryDataContracts();
        }

        public IQueryable<RelaxStoryDataContract> GetStoryDataContract()
        {
            return _newRefDao.GetStoryDataContract();
        }

        public IQueryable<RelaxStoryDataContract> GetStoryId()
        {
            return _newRefDao.GetStoryId();
        }

        #endregion

        #region Hàm Add
        public void Add(NEWS_REF story)
        {
            _newRefDao.Add(story);
        }
       
        #endregion

        #region Hàm Update
        public void Update(NEWS_REF story)
        {
           _newRefDao.Update(story);
        }
        public void UpdateView(long id)
        {
            _newRefDao.UpdateView(id);
        }
        #endregion

        #region Hàm Delete
        public void Delete(int iId)
        {
            _newRefDao.Delete(iId);
        }
        #endregion

    }
}
